package br.com.vendaext.gerencial.util;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

public class LancaExceptionErro extends Exception {

	private static final long serialVersionUID = -2302037629805899674L;

	public void addError(String msg, String detail) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,msg, detail));
	}
	
	public LancaExceptionErro(String msg) {
		addError(msg, "");
	}
	
}
